<template>
  <div class="index-container">
    <Header title="参会报名">
      <!--      <van-tag class="text-tag" type="danger" size="large">温馨提示：【未提供最终内容】</van-tag>-->
      <!--      <van-notice-bar>-->
      <!--        “温馨提示：参会报名系统预计11月6日零点上线，请各参会人员按时报名。测试期间所有填报的信息将会在上线时清空。谢谢！”-->
      <!--      </van-notice-bar>-->
      <!--专家或参赛人员需要显示提示信息-->
      <!--      <van-notice-bar v-if="isCsry || isPs" :text="noticeMsg"/>-->
    </Header>

    <div class="warpper">
      <van-form @submit="onSubmit" ref="userForm" @failed="onFail">
        <div class=" basicInfo-box">
          <div class="flex-center-between">
            <p class="basicInfo">个人基本信息</p>
            <van-tag v-if="selfUserInfo.shzt == '0'" type="warning">待审核</van-tag>
            <van-tag v-else-if="selfUserInfo.shzt == '1'" type="success">审核通过</van-tag>
            <van-tag v-else-if="selfUserInfo.shzt == '2'" type="danger">审核不通过</van-tag>
            <van-tag v-else type="primary">未提交参会信息</van-tag>
          </div>
          <p class="lable-item" v-if="selfUserInfo.shzt == '2'">审核不通过原因:{{ selfUserInfo.shyy }}</p>


        </div>

        <!--        是否管理人员-->
        <van-field
          v-model="selfUserInfo.ismanager" name="ismanager" readonly v-show="false"/>
        <!--        送站点-->
        <van-field v-model="selfUserInfo.szd" name="szd" readonly v-show="false"/>
        <!--        到站点-->
        <van-field v-model="selfUserInfo.dzd" name="dzd" readonly v-show="false"/>
        <!--        参会类型-->
        <van-field v-model="selfUserInfo.chlx" name="chlx" readonly v-show="false"/>
        <!--        参会类型细分类型-->
        <van-field v-model="selfUserInfo.chlx_xflx" name="chlx_xflx" readonly v-show="false"/>
        <!--        证件类型-->
        <van-field v-model="selfUserInfo.zjlx" name="zjlx" readonly v-show="false"/>
        <!--        出发省-->
        <van-field v-model="selfUserInfo.province" name="province" readonly v-show="false"/>
        <!--        出发市-->
        <van-field v-model="selfUserInfo.city" name="city" readonly v-show="false"/>
        <!--        居住地代码-->
        <van-field v-model="selfUserInfo.jzddm" name="jzddm" readonly v-show="false"/>
        <!--        交通方式-->
        <van-field v-model="selfUserInfo.traffic_type" name="traffic_type" readonly v-show="false"/>
        <!--        单位所在地-->
        <van-field v-model="selfUserInfo.dwszd" name="dwszd" readonly v-show="false"/>
        <!--        是否住宿-->
        <van-field v-model="selfUserInfo.sfzs" name="sfzs" readonly v-show="false"/>
        <!--        是否参加闭幕式-->
        <van-field v-model="selfUserInfo.sfcjbms" name="sfcjbms" readonly v-show="false"/>
        <!--        博士博士后人员类别-->
        <van-field v-model="selfUserInfo.bsrylb" name="bsrylb" readonly v-show="false"/>
        <!--        在读/毕业院校-->
        <!--        <van-field v-model="selfUserInfo.school" name="school" readonly v-show="false" />-->
        <!--        是否跟车-->
        <van-field v-model="selfUserInfo.sfgc" name="sfgc" readonly v-show="false"/>
        <!--        是否申请单间-->
        <van-field v-model="selfUserInfo.sfsqdj" name="sfsqdj" readonly v-show="false"/>
        <!--        团队编号-->
        <van-field v-model="selfUserInfo.tdbh" name="tdbh" readonly v-show="false"/>
        <!--        防疫编号-->
        <van-field v-model="selfUserInfo.fybh" name="fybh" readonly v-show="false"/>
        <!--        主键-->
        <van-field v-model="selfUserInfo.id" name="id" readonly v-show="false"/>
        <!--        有效标识-->
        <van-field v-model="selfUserInfo.aae100" name="aae100" readonly v-show="false"/>
        <!--        姓名-->
        <van-field v-model="selfUserInfo.xm" name="xm" label="姓名" placeholder="姓名" v-show="false" readonly/>
        <!--        证件号码-->
        <van-field v-model="selfUserInfo.idcard" name="idcard" readonly v-show="false"/>
        <!--        手机号码-->
        <van-field v-model="selfUserInfo.tel" name="tel" v-show="false" readonly/>
        <!--        单位编号-->
        <van-field v-model="selfUserInfo.dwbh" name="dwbh" v-show="false" readonly/>
        <van-field v-model="handleUserInfo.xm" name="zae019" label="最后操作人" v-show="false"/>
        <van-field v-model="handleUserInfo.id" name="zae011" label="最后操作人代码" v-show="false"/>
        <!--        是否现场参赛-->
        <!--        <van-field v-model="selfUserInfo.sfxccs" name="sfxccs" v-show="false" readonly/>-->
        <!--        以上为隐藏字段-->


        <!--        人员基本信息-->
        <van-field
          v-model="selfUserInfo.fakexm"
          name="fakexm"
          label="姓名"
          placeholder="请填写姓名"
          readonly
          :rules="[{ required: true}]"
        />

        <van-field label-class="vaild" name="xb" label="性别" placeholder="请选择性别"
                   :rules="[{ required: true,message:'请选择性别'}]">
          <template #input>
            <van-radio-group v-model="selfUserInfo.xb" direction="horizontal">
              <van-radio name="male">男</van-radio>
              <van-radio name="female">女</van-radio>
            </van-radio-group>
          </template>
        </van-field>

        <van-field
          v-model="selfUserInfo.zjlxValue"
          name="zjlxValue"
          label="证件类型"
          placeholder="请填写证件类型"
          readonly
          :rules="[{ required: true }]"
        />

        <van-field
          v-model="selfUserInfo.fakeidcard"
          name="fakeidcard"
          label="证件号码"
          placeholder="请填写证件号码"
          readonly
          :rules="[{ required: true}]"
        />
        <van-field
          v-model="selfUserInfo.faketel"
          name="faketel"
          label="手机号码"
          placeholder="请填写手机号码"
          readonly
          :rules="[{ required: true }]"
        />


        <div style="padding: 20px">
          <van-button type="info" style="width: 100%;" native-type="button" @click="showInfo">{{ showBtnName }}
          </van-button>
        </div>


        <van-tabs>
          <!--          部不提供参赛信息，参赛信息代码暂时屏蔽-->
          <!--          参赛信息-->
          <!--          <van-tab title="参赛信息" v-if="isCsry">
                      <van-field
                        readonly
                        v-model="selfUserInfo.csd"
                        name="csd"
                        label="参赛队"
                        placeholder="请填写参赛队"
                        v-if="isCsry"
                        :rules="[{ required: isCsry }]"
                      />
                      <van-field
                        readonly
                        v-model="selfUserInfo.sz"
                        name="sz"
                        label="赛组"
                        placeholder="请填写赛组"
                        v-if="isCsry"
                        :rules="[{ required: isCsry }]"
                      />
                      <van-field
                        readonly
                        v-model="selfUserInfo.sd"
                        name="sd"
                        label="赛道"
                        placeholder="请填写赛道"
                        v-if="isCsry"
                        :rules="[{ required: isCsry}]"
                      />
                      <van-field
                        readonly
                        v-model="selfUserInfo.xmbh"
                        name="xmbh"
                        label="项目编号"
                        placeholder="请填写项目编号"
                        v-if="isCsry"
                        :rules="[{ required: isCsry }]"
                      />
                      <van-field
                        readonly
                        v-model="selfUserInfo.xmmc"
                        name="xmmc"
                        label="项目名称"
                        placeholder="请填写项目名称"
                        v-if="isCsry"
                        :rules="[{ required: isCsry}]"
                      />
                      <van-field
                        readonly
                        v-model="selfUserInfo.szh"
                        name="szh"
                        label="赛序号"
                        placeholder="请填写赛序号"
                        v-if="isCsry"
                        :rules="[{ required: isCsry}]"
                      />

                      &lt;!&ndash;            暂时暂停&ndash;&gt;
                      &lt;!&ndash;            <van-field&ndash;&gt;
                      &lt;!&ndash;              v-model="selfUserInfo.csdbd"&ndash;&gt;
                      &lt;!&ndash;              name="csdbd"&ndash;&gt;
                      &lt;!&ndash;              label="参赛代表队名称"&ndash;&gt;
                      &lt;!&ndash;              placeholder="参赛代表队名称"&ndash;&gt;
                      &lt;!&ndash;              readonly&ndash;&gt;
                      &lt;!&ndash;              v-if="isCsry"&ndash;&gt;
                      &lt;!&ndash;              :rules="[{ required: true, message: '请填写参赛代表队名称' }]"&ndash;&gt;
                      &lt;!&ndash;            />&ndash;&gt;
                    </van-tab>-->

          <!--          参会信息-->
          <van-tab title="参会信息">
            <van-field
              readonly
              clickable
              name="tdmc"
              label-class="vaild"
              v-model="selfUserInfo.tdmc"
              autocomplete="off"
              label="参会人员类别"
              placeholder="点击选择参会人员类别"
              @click="isUpdate ? showCommonPicker('tdmc',csryColumns):''"
              type="textarea"
              rows="1"
              autosize
              :rules="[{ required: true }]"
            />
            <van-field
              v-if="isDbd == 1"
              readonly
              clickable
              name="tdmc"
              label-class="vaild"
              v-model="selfUserInfo.tdmc1"
              autocomplete="off"
              label="参赛代表团名称"
              placeholder="点击选择参赛代表团名称"
              @click="isUpdate ? showCommonPicker('team',teamData):''"
              :rules="[{ required: true }]"
            />
            <!--            人员参会类型-->
            <van-field
              v-if="showRylb"
              v-model="selfUserInfo.chlxValue"
              name="chlxValue"
              label="团队人员类别"
              placeholder="请填写团队人员类别"
              readonly
              label-class="vaild"
              @click="isUpdate ? showCommonPicker('chlx',rylbColumns):''"
              :rules="[{ required: true}]"
            />
            <van-field
              readonly
              clickable
              name="chlx_xflxValue"
              :value="selfUserInfo.chlx_xflxValue"
              label="人员细分类别"
              placeholder="点击选择人员细分类别"
              @click="showCommonPicker('chlx_xflx','chlx_xflx')"
              v-if="xflxShow"
              label-class="vaild"
              :rules="[{ required: xflxShow }]"
            />

            <van-field
              name="parttime_chlx"
              label="兼职参会类型"
              v-if="showParttimeChlx"
              label-class="vaild"
            >
              <template #input>
                <van-checkbox-group v-model="selfUserInfo.parttime_chlx" direction="horizontal">
                  <!--                  <van-checkbox name="8" shape="square" :disabled="parttimeChlx8">管理服务联络员</van-checkbox>-->
                  <van-checkbox name="7" shape="square" :disabled="parttimeChlx7">宣传联络员</van-checkbox>
                  <van-checkbox name="11" shape="square" :disabled="parttimeChlx11">疫情防控联络员</van-checkbox>
                </van-checkbox-group>
              </template>
            </van-field>

            <!--邮箱-->
            <!--            全部显示，且都是选填-->
            <van-field
              v-model="selfUserInfo.email"
              name="email"
              label="邮箱"
              placeholder="请填写邮箱"

            />
            <van-field
              v-model="selfUserInfo.jzdmc"
              is-link
              readonly
              name="jzdmc"
              label="居住地"
              placeholder="请选择居住地"
              label-class="vaild"
              @click="chooseCity('jzdmc')"
              :rules="[{ required: true }]"
              type="textarea"
              rows="1"
              autosize
            />
            <!--            v-if="rcjlczdw || xqdw||ctjg||jszyjg||fhjg||bsh||bshtd||isReport"
                        :rules="[{ required: rcjlczdw||xqdw||ctjg||jszyjg||fhjg||bsh||bshtd }]"-->

            <!--            博士人员类别-->
            <van-field
              readonly
              clickable
              name="bsrylbValue"
              :value="selfUserInfo.bsrylbValue"
              label="人员类别"
              placeholder="点击选择人员类别"
              @click="showCommonPicker('bsrylb','bsrylb')"
              v-if="bsh||bshtd"
              label-class="vaild"
              :rules="[{ required: bsh||bshtd}]"
            />

            <!--专家不需要展示单位信息-->
            <van-field
              :readonly="dwChoose"
              :clickable="dwChoose"
              v-model="selfUserInfo.dw"
              name="dw"
              label="单位"
              placeholder="请填写单位，如无请填“无”"
              v-if="!isPs"
              label-class="vaild"
              autocomplete="false"
              :rules="[{ required: !isPs }]"
              @click="inputOrChoose('dw')"
            />
            <!--            单位所在地-->
            <van-field
              readonly
              clickable
              name="dwszdValue"
              :value="selfUserInfo.dwszdValue"
              :label="dwLabel"
              placeholder="点击选择单位所在地"
              label-class="vaild"
              @click="showCommonPicker('dwszd','dwszd')"
              v-if="rcjlczdw || xqdw||fhjg||bshtd"
              :rules="[{ required: rcjlczdw||xqdw||fhjg||bshtd }]"
            />

            <van-field
              :clickable="schoolChoose"
              :readonly="schoolChoose"
              v-model="selfUserInfo.school"
              name="school"
              label="在读/毕业院校"
              placeholder="请填写在读/毕业院校"
              @click="inputOrChoose('school')"
              label-class="vaild"
              v-if="bsh||bshtd"
              :rules="[{ required:bsh||bshtd }]"
            />

            <van-field
              v-model="selfUserInfo.zy"
              name="zy"
              label="所学专业"
              placeholder="请填写所学专业"
              label-class="vaild"
              v-if="(bsh||bshtd) && showForGxlly"
              :rules="[{ required:(bsh||bshtd) && showForGxlly }]"
            />

            <!--            是否跟车-->
            <van-field
              readonly
              clickable
              name="sfgcValue"
              :value="selfUserInfo.sfgcValue"
              label="是否跟车"
              placeholder="点击选择是否跟车"
              @click="showCommonPicker('sfgc','sfgc')"
              label-class="vaild"
              v-if="showGc && showForGxlly"
              :rules="[{ required: bsh && showForGxlly }]"
            />
            <van-notice-bar v-if="showGc && showForGxlly">
              提示：由大赛执委会统一接送，名额有限，具体由高校落实跟车名单；请根据发车时间合理安排交流会、闭幕式行程
            </van-notice-bar>

            <van-field
              v-model="selfUserInfo.zw"
              name="zw"
              label="职务"
              placeholder="请填写职务，如无请填“无”"
              label-class="vaild"
              @click="isReport ? showCommonPicker('zw','jzzw_code') : ''"
              :rules="[{ required: true }]"
            />
            <van-field
              v-model="selfUserInfo.jzzh"
              name="jzzh"
              label="记者证号"
              placeholder="请填写记者证号"
              label-class="vaild"
              v-if="isReport"
              :rules="[{ required: isReport }]"
            />
            <!--            <van-field-->
            <!--              readonly-->
            <!--              clickable-->
            <!--              name="sfxccsValue"-->
            <!--              :value="selfUserInfo.sfxccsValue"-->
            <!--              label="是否现场参赛(到佛山参赛)"-->
            <!--              placeholder="点击选择是否现场参赛"-->
            <!--              @click="showCommonPicker('sfxccs','sfxccs')"-->
            <!--              :rules="[{ required: true  }]"-->
            <!--            />-->
            <template v-if="showXccs">
              <!--            出发省-->
              <van-field
                v-model="selfUserInfo.province"
                name="province"
                label="出发省"
                v-if="false"
              />
              <!--            出发城市-->
              <van-field
                name="city_name"
                v-model="selfUserInfo.city_name"
                is-link
                readonly
                label="出发城市"
                placeholder="请选择出发城市"
                label-class="vaild"
                v-if="showFor40"
                @click="chooseCity('city_name')"
                :rules="[{ required: showFor40 }]"
                type="textarea"
                rows="1"
                autosize
              />
              <!--              <van-popup v-model="cityShow" round position="bottom">-->
              <!--                <van-cascader-->
              <!--                  v-model="cityCode"-->
              <!--                  title="请选择所在地区"-->
              <!--                  :options="cityOptions"-->
              <!--                  :field-names="cityFieldNames"-->
              <!--                  @close="cityShow = false"-->
              <!--                  @change="cityChange"-->
              <!--                  @finish="onFinish"-->
              <!--                />-->
              <!--              </van-popup>-->
              <!--            交通方式-->
              <van-field
                readonly
                clickable
                name="traffic_typeValue"
                :value="selfUserInfo.traffic_typeValue"
                label="交通方式"
                placeholder="点击选择交通方式"
                label-class="vaild"
                v-if="showFor40"
                @click="showCommonPicker('traffic_type','traffic_type')"
                :rules="[{ required: showFor40 }]"
              />

              <van-field
                readonly
                clickable
                name="ddrq"
                :value="selfUserInfo.ddrq"
                label="到达时间"
                placeholder="点击选择到达时间"
                label-class="vaild"
                v-if="showFor40"
                :rules="[{ required: showFor40 }]"
                @click="showDatetime('ddrq')"
              />
              <van-field
                v-model="selfUserInfo.ddhb"
                name="ddhb"
                label="到达航班/车次"
                placeholder="请填写到达航班/车次"
                label-class="vaild"
                v-if="dzRequire"
                :rules="[{ required: dzRequire }]"
              />

              <van-field
                readonly
                clickable
                name="dzdValue"
                :value="selfUserInfo.dzdValue"
                label="到站点"
                placeholder="点击选择到站点"
                @click="showZdPicker('dzd')"
                label-class="vaild"
                v-if="dzRequire"
                :rules="[{ required: dzRequire }]"
              />

              <van-field
                readonly
                clickable
                :value="selfUserInfo.fcrq"
                name="fcrq"
                label="返程时间"
                placeholder="点击选择返程时间"
                label-class="vaild"
                v-if="showFor40"
                :rules="[{ required: showFor40 }]"
                @click="showDatetime('fcrq')"
              />
              <van-field
                v-model="selfUserInfo.fchb"
                name="fchb"
                label="返程航班/车次"
                placeholder="请填写返程航班/车次"
                label-class="vaild"
                v-if="szRequire"
                :rules="[{ required: szRequire}]"
              />

              <van-field
                readonly
                clickable
                name="szdValue"
                :value="selfUserInfo.szdValue"
                label="送站点"
                placeholder="点击选择送站点"
                label-class="vaild"
                @click="showZdPicker('szd')"
                v-if="szRequire"
                :rules="[{ required: szRequire }]"
              />

              <!--            是否代订住宿-->
              <van-field
                readonly
                clickable
                name="sfzsValue"
                :value="selfUserInfo.sfzsValue"
                label="是否住宿"
                placeholder="点击选择是否住宿"
                label-class="vaild"
                v-if="showFor40"
                @click="showCommonPicker('sfzs','sfzs')"
                :rules="[{ required: showFor40 }]"
              />
              <van-field
                readonly
                clickable
                name="sfzsValue"
                :value="selfUserInfo.sfsqdjValue"
                v-if="zsRequire"
                label="是否申请单间"
                placeholder="点击选择是否申请单间"
                @click="showCommonPicker('sfsqdj','is_yes_or_no')"
              />
              <van-field
                readonly
                clickable
                :value="selfUserInfo.rzrq"
                name="rzrq"
                label="入住日期"
                placeholder="点击选择入住日期"
                label-class="vaild"
                v-if="zsRequire"
                :rules="[{ required: zsRequire }]"
                @click="showCalendar('rzrq')"
              />

              <van-field
                readonly
                clickable
                :value="selfUserInfo.ldrq"
                name="ldrq"
                label="离店日期"
                placeholder="点击选择离店日期"
                label-class="vaild"
                v-if="zsRequire"
                :rules="[{ required: zsRequire }]"
                @click="showCalendar('ldrq')"
              />


              <!--        <van-field
                        disabled
                        v-model="selfUserInfo.kmszw"
                        name="kmszw"
                        label="开幕式座位"
                        placeholder="无"
                      />
                      <van-field
                        disabled
                        v-model="selfUserInfo.bmszw"
                        name="bmszw"
                        label="闭幕式座位"
                        placeholder="无"
                      />-->


              <!--        参会时间-->
              <van-field name="chsj"
                         label="请选择参会时间"
                         label-class="vaild"
                         v-if="ctjg||bsh||bshtd"
                         :rules="[{ required: ctjg||bsh||bshtd}]"
              >
                <template #input>
                  <van-checkbox-group v-model="selfUserInfo.chsj" direction="horizontal">
                    <van-checkbox name="12月18日" shape="square">12月18日</van-checkbox>
                    <van-checkbox name="12月19日" shape="square">12月19日</van-checkbox>
                    <van-checkbox name="12月20日" shape="square">12月20日</van-checkbox>
                  </van-checkbox-group>
                </template>
              </van-field>
              <!--是否参加闭幕式-->
              <!--              <van-field-->
              <!--                readonly-->
              <!--                clickable-->
              <!--                name="sfcjbmsValue"-->
              <!--                :value="selfUserInfo.sfcjbmsValue"-->
              <!--                label="是否参加闭幕式"-->
              <!--                placeholder="点击选择是否参加闭幕式"-->
              <!--                label-class="vaild"-->
              <!--                @click="showCommonPicker('sfcjbms','sfcjbms')"-->
              <!--                :rules="[{ required: true}]"-->
              <!--              />-->
              <!--              <van-notice-bar wrapable :scrollable="false" text="闭幕式时间：11月21日20:00-21:20，选择参加闭幕式后续进行席位安排，安排完成后发送短信通知。">-->

              <!--              </van-notice-bar>-->
            </template>
            <van-field
              v-model="selfUserInfo.spgmbz"
              name="spgmbz"
              label="禁忌(过敏)食物"
              placeholder="请填写禁忌(过敏)食物,没有则填写“无”"
              label-class="vaild"
              :rules="[{ required: true }]"
            />
            <van-field
              type="textarea"
              rows="1"
              autosize
              v-model="selfUserInfo.bz"
              name="bz"
              label="备注"
              placeholder="请填写备注"
              :label-class="isOther?'vaild':''"
              :rules="[{ required: isOther }]"
            />

            <van-notice-bar v-if="isOther" text="交通方式/到站点/送站点/单位选择“其他”方式,请在备注写明"/>
          </van-tab>
        </van-tabs>

        <template v-if="showXccs">
          <!--          <van-field name="zj" label="证件照(大头照)" label-class="vaild">-->
          <!--            <template #input>-->
          <!--              <div class="ylt-box flex-center-between">-->
          <!--                <van-uploader result-type="file"-->
          <!--                              v-model="selfUserInfo.zj"-->
          <!--                              :after-read="afterRead('zj')"-->
          <!--                              accept="image/*"-->
          <!--                              :max-count="1"-->
          <!--                              :max-size="uploadMaxSize"-->
          <!--                              @oversize="onOversize"-->
          <!--                              @delete="deletePic('zj')"-->
          <!--                />-->
          <!--                <div class="ylt-item" @click="preview('ylt')">-->
          <!--                  <img src="~@/assets/img/ylt.jpg" class="ylt-img">-->
          <!--                  <p class="ylt-text ">样例图</p>-->
          <!--                </div>-->

          <!--              </div>-->

          <!--            </template>-->
          <!--          </van-field>-->


          <!--          <van-notice-bar wrapable :scrollable="false">-->
          <!--            1.报名确认需上传电子照片， 请先下载照片处理工具<a class="down-load" href="gwyzpclgj.zip" download="证件照处理"-->
          <!--          >（点击下载）</a-->
          <!--          >或<span class="down-load" @click="copy">（复制连接）</span>到PC打开下载，请根据<span-->
          <!--            class="down-load"-->
          <!--            @click="preview('zjz')"-->
          <!--          >（操作指引）</span-->
          <!--          >或 <span-->
          <!--            class="down-load"-->
          <!--            @click="preview('video')"-->
          <!--          >（证件照制作视频教学）</span-->
          <!--          >-->
          <!--            对照片进行处理、保存，否则无法完成照片上传和后续相关操作。-->
          <!--            <br/>-->
          <!--            2.上传照片提示文字：-->
          <!--            <br/>-->
          <!--            （1）需上传本人真实照片，JPG或JPEG格式，文件大于30K小于2M，图片像素大小上限为960*960，下限为500*500；-->
          <!--            <br/>-->
          <!--            （2）面部无其他物体遮挡，头发至于耳朵后方，清楚展示人物面部，不要美图、P图等。-->
          <!--          </van-notice-bar>-->
          <template v-if="develop">
            <van-field name="jkm" label="粤康码截图" label-class="vaild">
              <template #input>
                <van-uploader
                  v-model="selfUserInfo.jkm"
                  :after-read="afterRead('jkm')"
                  accept="image/*"
                  :max-count="1"
                  :max-size="uploadMaxSize"
                  @oversize="onOversize"
                  @delete="deletePic('jkm')"
                />
              </template>
            </van-field>
            <van-notice-bar>
              1.请按<span
              class="down-load"
              @click="preview('ykm')"
            >（粤康码操作指引）</span
            >
              进行截图、上传；<br/>
              2.抵达佛山前一天上传最新截图
            </van-notice-bar>
            <van-field name="xck" label="行程卡截图" label-class="vaild">
              <template #input>
                <van-uploader
                  v-model="selfUserInfo.xck"
                  :after-read="afterRead('xck')"
                  accept="image/*"
                  :max-count="1"
                  :max-size="uploadMaxSize"
                  @oversize="onOversize"
                  @delete="deletePic('xck')"
                />
              </template>
            </van-field>
            <van-notice-bar>
              1.请按<span
              class="down-load"
              @click="preview('xck')"
            >（行程卡操作指引）</span
            >
              进行截图、上传；<br/>
              2.抵达佛山前一天上传最新截图
            </van-notice-bar>
            <van-field name="jzqk" label="新冠疫苗接种情况" label-class="vaild">
              <template #input>
                <van-uploader
                  v-model="selfUserInfo.jzqk"
                  :after-read="afterRead('jzqk')"
                  accept="image/*"
                  :max-count="1"
                  :max-size="uploadMaxSize"
                  @oversize="onOversize"
                  @delete="deletePic('jzqk')"
                />
              </template>
            </van-field>
            <van-notice-bar>
              抵达佛山前一天上传最新截图
            </van-notice-bar>
            <van-notice-bar :scrollable="false" wrapable>
              请按<span
              class="down-load"
              @click="preview('yhs')"
            >（粤核酸操作指引）</span
            >
              提前在小程序自主填写好个人信息，生
              成个人二维码并截图保存，在核酸采样前出示给医务人员进行
              扫码绑定。<br/>

            </van-notice-bar>
          </template>
          <!--          <div class="flex-center develop-box" @click="develop=!develop">-->
          <!--            <van-icon :name="develop ?  'arrow-up' :'arrow-down'" size="25"/>-->
          <!--            {{ develop ? '收起' : '展开' }}-->
          <!--          </div>-->

        </template>

        <!--        <van-field name="bshsfzm"-->
        <!--                   v-if="bsh"-->
        <!--                   label="博士博士后身份证明">-->
        <!--          <template #input>-->
        <!--            <van-uploader-->
        <!--              v-model="selfUserInfo.bshsfzm"-->
        <!--              :after-read="afterRead('bshsfzm')"-->
        <!--              accept="image/*"-->
        <!--              :max-count="1"-->
        <!--              :max-size="maxSize"-->
        <!--              @oversize="onOversize"-->
        <!--              @delete="deletePic('bshsfzm')"-->
        <!--            />-->
        <!--          </template>-->
        <!--        </van-field>-->
        <!--        <van-notice-bar-->
        <!--          v-if="bsh">-->
        <!--          “博士博士后身份证明”用于资格审核，可提供学信网截图-->
        <!--        </van-notice-bar>-->

        <!--        <van-field name="sftycns" :rules="[{ required: true, message: '请阅读并同意疫情防控安全承诺书' }]">
                  <template #input>
                    <van-checkbox v-model="selfUserInfo.sftycns" shape
                    ><p @click.stop="dialogCns">请阅读并同意疫情防控安全承诺书</p></van-checkbox
                    >
                  </template>
                </van-field>-->


        <div class="two-btn">
          <template v-if="isShowBtn">
            <van-button class="btn" round type="danger" @click="rollback" native-type="button"
                        v-if="selfUserInfo.shzt=='0' && parseInt(selfUserInfo.chlx)>3">撤回
            </van-button>
          </template>
          <!--          getShowChlx(selfUserInfo.chlx) -->
          <template v-if="showSubmit">
            <van-button class="btn" round type="info" native-type="submit">提交</van-button>
          </template>
        </div>
      </van-form>

      <!-- 日历组件-->
      <van-calendar v-model="arrivesShowCalendar"
                    :min-date="minDate"
                    :max-date="maxDate"
                    @confirm="arriveCalenderConfirm"/>
      <!--      日期组件-->
      <van-popup
        position="bottom"
        v-model="dateTimePicker">
        <van-datetime-picker
          v-model="currentDate"
          type="datetime"
          title="请选择时间"
          @confirm="datetimeConfirm"
          @cancel="dateTimePicker=false"
          :min-date="dateTimeMinDate"
          :max-date="dateTimeMaxDate"
          :formatter="datetimeFormatter"
        />
      </van-popup>
      <!--站点组件-->
      <van-popup v-model="zdShowPicker" position="bottom">
        <van-picker
          value-key="value"
          show-toolbar
          :columns="zdColumns"
          @confirm="zdOnConfirm"
          @cancel="zdShowPicker = false"
        />
      </van-popup>

      <!--      通用picker组件-->
      <van-popup v-model="commonPicker" position="bottom">
        <van-picker
          value-key="value"
          show-toolbar
          :columns="commonColumns"
          @confirm="commonOnConfirm"
          @cancel="commonPicker = false"
        />
      </van-popup>

      <!--      疫情承诺书-->
      <van-dialog v-model="showCns" show-cancel-button @confirm="cnsConfirm" @cancel="selfUserInfo.sftycns = false">
        <div class="content">
          <div v-html="wordText"></div>
        </div>
      </van-dialog>

      <!--      查询组件-->
      <search-popup v-if="searchShow" :searchPlaceholder="searchPlaceholder" :columns="searchColumns"
                    @searchClose="searchShow=false" @searchConfirm="searchConfirm"></search-popup>
      <!--      预览组件-->
      <overlay :mediaType="mediaType" v-if="czzyShow" :czzyImages="czzyImages" @close="czzyShow=false"></overlay>
      <!--      城市组件-->
      <city-popup v-if="cityShow" @cityChange="cityChange" @cityClose="cityShow=false"></city-popup>
    </div>
  </div>
</template>

<script>
import { revokeDoctorUser, loadUserInfo, checkDoctorZg01, checkDoctorPermission } from 'api/userInfo'
import minixUploadPic from '@/minix/minixUploadPic'
import minixUserSave from '@/minix/minixUserSave'
import minixCalendar from '@/minix/minixCalendar'
import minixLoadPic from '@/minix/minixLoadPic'
import minixZd from '@/minix/minixZd'
import picUtil from '@/utils/picUtil'
import { Site, chlxArray, csryColumns, teamData, zjlx, sfzs, traffic_type, codeList } from '@/utils/code'
import { getSelfInfo } from '@/utils/tokenUtil'
import { getWordText } from '@/utils/covertWord'
import minixCommonPicker from '../../minix/minixCommonPicker'
import { getRealArrData, returnArray, parseTime } from '@/utils/'
import { rcDwData, cgDwData } from '@/utils/dwCode'
import { mapState, mapActions, mapGetters } from 'vuex'
import Overlay from '@/components/Overlay'
import CityPopup from '@/components/CityPopup'
import SearchPopup from '@/components/SearchPopup'

let dwData = [], cityCol = '', searchType = ''
export default {
  name: 'teamRace',
  props: {
    // userInfo:{type:Object}
    id: { default: null }
  },
  components: { Overlay, CityPopup, SearchPopup },
  mixins: [minixUploadPic, minixCalendar, minixLoadPic, minixUserSave, minixZd, minixCommonPicker], //复用mixin
  data() {
    return {
      selfUserInfo: {}, // 用户参会信息
      handleUserInfo: {}, // 操作人
      arrivesShowCalendar: false,
      calendarNanme: null,
      picArray: [picUtil.zj],
      zdShowPicker: false,
      zdColumns: Site,
      zdFieldName: '',
      isOther: false,
      wordText: '',
      showCns: false,
      noticeMsg: '默认信息',
      commonPicker: false,
      commonColumns: [],
      commonFieldName: '',
      //入住、离店日期限制
      minDate: new Date(2021, 10, 1),
      maxDate: new Date(2021, 10, 30),
      // 省市字段控制
      cityShow: false,
      //到达航班、到站点是否必填设置
      dzRequire: false,
      //返程航班、到站点是否必填设置
      szRequire: false,
      //是否住宿
      zsRequire: false,
      // 个性化字段控制显示
      //人才交流参展单位 chlx=18
      rcjlczdw: false,
      //科研成果转化对接需求单位 chlx=35、揭榜领题对接需求单位 chlx=36
      xqdw: false,
      //创投机构 chlx=37
      ctjg: false,
      //技术转移机构 chlx=38
      jszyjg: false,
      //孵化机构、高新技术园区 chlx =39
      fhjg: false,
      //人才交流参会博士博士后 chlx =57
      bsh: false,
      //揭榜领题对接参会博士博士后及团队 chlx=41
      bshtd: false,
      dwLabel: '单位所在地',
      //是否显示跟车信息
      showGc: false,
      showFor40: true,
      dateTimePicker: false,
      dateTimeMinDate: new Date(2021, 11, 1),
      dateTimeMaxDate: new Date(2021, 11, 22),
      currentDate: new Date(),
      xflxShow: false,

      showParttimeChlx: false,
      parttimeChlx8: false,
      parttimeChlx7: false,
      parttimeChlx11: false,

      // 高校联络员隐藏的字段
      showForGxlly: true,

      // 团队人员类别
      rylbColumns: [],
      isDbd: 0,
      showPickerTeam: false,
      showPickerCsry: false,
      csryColumns,
      teamData,
      showRylb: false,
      // 是否现场参赛
      showXccs: true,
      develop: false,

      hiddingFakeXm: null,
      hiddingFakeIdCard: null,
      hiddingFakkeTel: null,
      showBtnName: '展示完整信息',
      dwChoose: false,
      searchShow: false,
      searchColumns: [],
      searchPlaceholder: '',
      schoolChoose: false,
      showSubmit: true
    }
  },

  mounted() {
    this.getBtnStatusAsync()
    this.handleUserInfo = getSelfInfo()
    // console.log('团队参赛信息挂载')
    this.loadUserInfo()

    // let child = getRealArrData(Site)
    // let obj = {}
    // child.map(item => {
    //   obj[item.key] = item.value
    // })
    // console.log(obj)
  },
  methods: {
    chooseCity(col) {
      cityCol = col
      this.cityShow = true
    },
    cityChange({ regionKey, regionName }) {
      if (cityCol == 'jzdmc') {
        this.selfUserInfo.jzdmc = regionName
        this.selfUserInfo.jzddm = regionKey
      } else {
        this.selfUserInfo.city_name = regionName
        this.selfUserInfo.city = regionKey
      }
      this.cityShow = false
    },

    showInfo() {
      if (this.hiddingFakeXm == null || this.hiddingFakeIdCard == null || this.hiddingFakkeTel == null) {
        this.hiddingFakeXm = this.selfUserInfo.fakexm
        this.hiddingFakeIdCard = this.selfUserInfo.fakeidcard
        this.hiddingFakkeTel = this.selfUserInfo.faketel

        this.selfUserInfo.fakexm = this.selfUserInfo.xm
        this.selfUserInfo.fakeidcard = this.selfUserInfo.idcard
        this.selfUserInfo.faketel = this.selfUserInfo.tel
        this.showBtnName = '隐藏用户信息'
      } else {
        this.selfUserInfo.fakexm = this.hiddingFakeXm
        this.selfUserInfo.fakeidcard = this.hiddingFakeIdCard
        this.selfUserInfo.faketel = this.hiddingFakkeTel

        this.hiddingFakeXm = null
        this.hiddingFakeIdCard = null
        this.hiddingFakkeTel = null

        this.showBtnName = '展示完整信息'
      }
    },
    rollback() {
      revokeDoctorUser({
        id: this.selfUserInfo.id,
        zae011: this.selfUserInfo.id,
        zae019: this.selfUserInfo.xm
      }).then(res => {
        this.$dialog.alert({
          message: '撤回成功'
        }).then(() => {
          this.loadUserInfo()
        })
      })
    },
    inputOrChoose(type) {
      // 人才交流参展单位 chlx=18
      // 博士后工作成果参展单位代表 chlx=10
      searchType = type
      if (type == 'dw') {
        if (this.selfUserInfo.chlx == '18') {
          dwData = rcDwData
          this.searchShow = true
        } else if (this.selfUserInfo.chlx == '10') {
          dwData = cgDwData
          this.searchShow = true
        } else {
          this.selfUserInfo.dwbh = ''
          this.searchShow = false
        }
        this.searchPlaceholder = '请输入单位名称进行搜索'
        this.searchColumns = dwData
      } else if (type == 'school') {
        if (this.selfUserInfo.chlx == '40') {
          this.searchColumns = codeList.school
          this.searchShow = true
          this.searchPlaceholder = '请输入学校名称进行搜索'
        } else {
          this.searchShow = false
        }

      }
    },
    searchConfirm(item) {
      if (searchType == 'dw') {
        this.selfUserInfo.dw = item.value
        this.selfUserInfo.dwbh = item.key
        if (item.key == '999') {
          this.isOther = true
        } else {
          this.isOther = false
        }
      } else if (searchType == 'school') {
        this.selfUserInfo.school = item.key
        this.actionFor40()
      }
      this.searchShow = false
    },
    copy() {
      this.$copyText('https://ggfw.hrss.foshan.gov.cn/fsPostDoctorApp/gwyzpclgj.zip')
      this.$notify({ type: 'success', message: '复制成功' })
    },
    dialogCns() {
      if (this.wordText) {
        this.showCns = true
      } else {
        getWordText('cns.docx').then(html => {
          this.wordText = html
          this.showCns = true
        })
      }
    },
    cnsConfirm() {
      this.$dialog
        .alert({
          title: '提示',
          message: '<span style=\'color:red;font-weight:bold;\'>注：同意勾选疫情防控安全承诺书的有效期是到大赛结束</span>'
        })
        .then(() => {
          this.selfUserInfo.sftycns = true
        })
    },
    getArrData(field, key, arr) {
      //获取真实的字段代码值
      arr = getRealArrData(arr)
      let data = arr.filter(item => item.key == key)
      if (data.length > 0) {
        this.$set(this.selfUserInfo, field + 'Value', data[0].value)
      }
    },
    checkZg01(userid) {
      checkDoctorZg01({ userid }).then((res) => {
        this.showSubmit = true
      }).catch(e => {
        this.$dialog.alert({
          title: '提示',
          message: e.msg
        })
        this.showSubmit = false
      })
    },
    loadUserInfo() {
      let queryId = null
      if (!!this.id) {
        queryId = this.id
      } else {
        queryId = getSelfInfo().id
      }
      // 查询人员是否有待办业务
      this.checkZg01(queryId)
      loadUserInfo({ id: queryId })
        .then(res => {
          let rs = JSON.parse(res.data)
          rs = rs[0]
          this.selfUserInfo = { ...rs }
          // 人员管理界面进来的显示图片

          if (this.selfUserInfo.id != this.handleUserInfo.id) {
            this.develop = true
            // 判断人员是否有修改权限
            this.checkPermission(this.handleUserInfo)
          }
          //  初始化参会人员类别，参赛代表团名称，团队人员类别
          let tdbh = parseInt(this.selfUserInfo.tdbh), chlxKey
          if (tdbh > 0 && tdbh <= 47) {
            chlxKey = 99
          } else {
            chlxKey = tdbh
          }
          let teamData = returnArray(chlxArray, 'key', chlxKey)
          if (teamData.length > 0) {
            if (teamData[0].showChild && teamData[0].hasOwnProperty('child')) {
              this.rylbColumns = returnArray(teamData[0].child, 'show', true)
              this.showRylb = true
            }
          }
          // this.selfUserInfo.uploadpicture = []
          if (!!!this.selfUserInfo.cpsj) {
            this.selfUserInfo.cpsj = []
          } else {
            this.selfUserInfo.cpsj = JSON.parse(this.selfUserInfo.cpsj)
          }
          //初始化下拉选项信息
          this.getArrData('dzd', this.selfUserInfo.dzd, Site)
          this.getArrData('szd', this.selfUserInfo.szd, Site)
          this.getArrData('chlx', this.selfUserInfo.chlx, chlxArray)
          this.getArrData('zjlx', this.selfUserInfo.zjlx, zjlx)
          this.getArrData('sfzs', this.selfUserInfo.sfzs, sfzs)
          this.getArrData('sfsqdj', this.selfUserInfo.sfsqdj, codeList.is_yes_or_no)
          this.getArrData('traffic_type', this.selfUserInfo.traffic_type, traffic_type)
          this.getArrData('dwszd', this.selfUserInfo.dwszd, codeList.dwszd)
          this.getArrData('sfcjbms', this.selfUserInfo.sfcjbms, codeList.sfcjbms)
          this.getArrData('bsrylb', this.selfUserInfo.bsrylb, codeList.bsrylb)
          this.getArrData('sfgc', this.selfUserInfo.sfgc, codeList.sfgc)
          this.getArrData('chlx_xflx', this.selfUserInfo.chlx_xflx, codeList.chlx_xflx)
          this.getArrData('sfxccs', this.selfUserInfo.sfxccs, codeList.sfxccs)
          // // 是否到现场参赛，隐藏住宿证件照上传
          // if (this.selfUserInfo.sfxccs == '01') {
          //   this.showXccs = true
          // } else if (this.selfUserInfo.sfxccs == '02') {
          //   this.showXccs = false
          // }
          //初始化到达日期和返程日期时间戳
          if (!!this.selfUserInfo.ddrq) {
            let ddd = new Date(this.selfUserInfo.ddrq)
            this.selfUserInfo.ddrq = parseTime(ddd)
          }
          if (!!this.selfUserInfo.fcrq) {
            let ddd = new Date(this.selfUserInfo.fcrq)
            this.selfUserInfo.fcrq = parseTime(ddd)
          }

          //初始化是否显示参会类型的细分人员类别(天津队伍的工作人员类型才有细分)
          if (this.selfUserInfo.tdbh == 2 && this.selfUserInfo.chlx == 12) {
            this.xflxShow = true
          }

          //初始化参会人员类别显示
          if (this.selfUserInfo.tdbh <= 47) {
            this.selfUserInfo['tdmc1'] = this.selfUserInfo.tdmc
            this.selfUserInfo['tdmc'] = '参赛代表团'
            this.isDbd = 1
          } else {
            this.selfUserInfo['tdmc'] = this.selfUserInfo.tdmc
            this.isDbd = 0
          }
          //初始化出发城市显示
          // if (!!this.selfUserInfo.province) {
          //   let provinceCityArray = new Array()
          //   provinceCity.forEach(p => {
          //     if (p.value == this.selfUserInfo.province) {
          //       provinceCityArray.push(p)
          //       if (p.hasOwnProperty('children')) {
          //         p.children.forEach(c => {
          //           if (c.value == this.selfUserInfo.city) {
          //             provinceCityArray.push(c)
          //           }
          //         })
          //       }
          //     }
          //   })
          //   this.cityValue = provinceCityArray.map((option) => option.text).join('/')
          // }
          //初始化交通方式影响站点的信息
          this.trafficOnChange('traffic_type', this.selfUserInfo.traffic_type)
          //初始化是否住宿影响入住和离店信息
          this.zsOnChange('sfzs', this.selfUserInfo.sfzs)
          //初始化是否跟车影响其他行程信息
          this.actionFor40()
          //初始化【人才交流参会博士博士后】团队的高校联络员
          if (this.selfUserInfo.chlx == '40' && this.selfUserInfo.bsrylb == '05') {
            this.bsrylbOnChange('bsrylb', this.selfUserInfo.bsrylb)
          }
          //初始化个性化字段显示
          this.initSpecificField()
          // 初始化参会时间
          if (!!!this.selfUserInfo.chsj) {
            this.selfUserInfo.chsj = []
          } else {
            this.selfUserInfo.chsj = JSON.parse(this.selfUserInfo.chsj)
          }
          //初始化兼职参会类型
          if (!!!this.selfUserInfo.parttime_chlx) {
            this.selfUserInfo.parttime_chlx = []
          } else {
            this.selfUserInfo.parttime_chlx = JSON.parse(this.selfUserInfo.parttime_chlx)
          }
          //初始化兼职的参会类型，只给团队参赛的参会类型为管理服务联络员、宣传联络员、疫情防控联络员三种显示
          this.showParttime()

          //身份证类的的人员自动初始化性别
          if (!!!this.selfUserInfo.xb && this.selfUserInfo.zjlx == '01') {
            this.selfUserInfo.xb = this.getSex(this.selfUserInfo.idcard)
          }

          //初始化图片信息
          // this.loadPic(this.picArray)
        })
    },
    checkPermission(userInfo) {
      if (parseInt(userInfo.tdbh) > 47) {
        checkDoctorPermission({ idcard: userInfo.idcard }).then((res) => {
          if (res.data != '{}') {
            let permission = JSON.parse(res.data).permission
            if (permission.BSTALTERPERMIS == 'true') {
              this.showSubmit = true
            } else {
              this.showSubmit = false
            }
          }
        })
      }

    },
    initSpecificField() {
      this.bshtd = false
      this.bsh = false
      this.fhjg = false
      this.jszyjg = false
      this.ctjg = false
      this.xqdw = false
      this.rcjlczdw = false
      this.dwLabel = '单位所在地'
      //个性化字段展示
      if (this.selfUserInfo.chlx == '18') {
        // 人才交流参展单位
        this.rcjlczdw = true
        /*单位（可以搜索指定210家单位），通用字段不处理
        单位所在地
        邮箱
        是否代订住宿，通用字段不处理
        是否参加闭幕式
        */
      } else if (this.selfUserInfo.chlx == '35' || this.selfUserInfo.chlx == '36') {
        //科研成果转化对接需求单位 chlx=35、揭榜领题对接需求单位 chlx=36
        this.xqdw = true
        /*单位所在地
        邮箱
        是否代订住宿，通用字段不处理
        是否参加闭幕式*/
      } else if (this.selfUserInfo.chlx == '37') {
        //创投机构 chlx=37
        this.ctjg = true
        /*邮箱
        是否代订住宿，通用字段不处理
        参会时间
        是否参加闭幕式*/
      } else if (this.selfUserInfo.chlx == '38') {
        //技术转移机构 chlx=38
        this.jszyjg = true
        /*邮箱
        是否代订住宿，通用字段不处理
        是否参加闭幕式*/
      } else if (this.selfUserInfo.chlx == '39') {
        //孵化机构、高新技术园区 chlx =39
        this.fhjg = true
        /*单位所在地
        邮箱
        是否代订住宿，通用字段不处理
        是否参加闭幕式*/
      } else if (this.selfUserInfo.chlx == '40') {
        //人才交流参会博士博士后 chlx =40
        this.bsh = true
        this.dwLabel = '高校所在地'
        /*邮箱
        博士博士后人员类别
        高校所在地(单位所在地)
        在读/毕业院校
        所学专业
        是否跟车
        是否代订住宿，通用字段不处理
        参会时间
        是否参加闭幕式
        上传博士博士后身份证明名称（图片上传）*/
        // this.picArray.push(picUtil.bshsfzm)
      } else if (this.selfUserInfo.chlx == '41') {
        //揭榜领题对接参会博士博士后及团队 chlx=41
        this.bshtd = true
        /*单位所在地
        邮箱
        博士博士后人员类别
        在读/毕业院校
        所学专业
        是否代订住宿，通用字段不处理
        参会时间
        是否参加闭幕式*/
      }

    },
    showParttime() {
      if (this.selfUserInfo.tdbh <= 47 &&
        (this.selfUserInfo.chlx == 8 || this.selfUserInfo.chlx == 7 || this.selfUserInfo.chlx == 11)
      ) {
        this.showParttimeChlx = true
        if (this.selfUserInfo.chlx == '8') {
          this.parttimeChlx8 = true
          this.parttimeChlx7 = false
          this.parttimeChlx11 = false
        }
        if (this.selfUserInfo.chlx == '7') {
          this.parttimeChlx7 = true
          this.parttimeChlx8 = false
          this.parttimeChlx11 = false
        }
        if (this.selfUserInfo.chlx == '11') {
          this.parttimeChlx11 = true
          this.parttimeChlx7 = false
          this.parttimeChlx8 = false
        }
      } else {
        this.showParttimeChlx = false
        this.parttimeChlx7 = false
        this.parttimeChlx11 = false
        this.parttimeChlx8 = false
      }
    },
    actionFor40() {
      this.showGc = false
      if (this.selfUserInfo.chlx == '40' && this.selfUserInfo.bsrylb != '05') {
        //检查学校名称是否在指定的院校名单内，如果是，显示是否跟车
        codeList.school.forEach(s => {

          if (s.key == this.selfUserInfo.school) {
            // 显示跟车
            this.showGc = s.isGc
          }
        })
        if (!this.showGc) {
          this.selfUserInfo.sfgc = ''
          this.selfUserInfo.sfgcValue = ''
        }
        //指定学校会影响是否跟车选项的显示
        this.gcOnChange('sfgc', this.selfUserInfo.sfgc)
      }
    },
    getSex(zjhm) {
      if (!!zjhm) {
        if (zjhm.length == 18 && zjhm.substr(16, 1) % 2 == 1) {
          return 'male'
        } else if (zjhm.length == 18 && zjhm.substr(16, 1) % 2 == 0) {
          return 'female'
        } else if (zjhm.length == 15 && zjhm.substr(14, 1) % 2 == 1) {
          return 'male'
        } else if (zjhm.length == 15 && zjhm.substr(14, 1) % 2 == 0) {
          return 'female'
        }
      } else {
        return null
      }
    },
    ...mapActions(['getBtnStatusAsync'])
  }
  ,
  computed: {
    ...
      mapState(['btnChlx', 'isShowBtn']),
    ...
      mapGetters(['getShowChlx']),
    // 1.参赛选手不能修改
    // 2.当审核状态为待提交，审核不通过时才能修改参会人员类别，参赛代表团名称，团队人员类别
    isUpdate() {
      // if (this.id != null) {
      //   if (this.id != this.handleUserInfo.id) {
      //     return false
      //   }
      // } else {
      //
      // }
      if (this.selfUserInfo.chlx == '1' || this.selfUserInfo.chlx == '2' || this.selfUserInfo.chlx == '3' || this.selfUserInfo.chlx == '17') {
        return false
      }
      if (this.selfUserInfo.shzt == '0' || this.selfUserInfo.shzt == '1') {
        return false
      }
      return true
    }
    ,
    isCsry() {
      //判断是否为参赛人员，包括创新赛参赛选手、创业赛参赛选手、揭榜领题赛参赛选手
      if (this.selfUserInfo.chlx == '1' || this.selfUserInfo.chlx == '2' || this.selfUserInfo.chlx == '3') {
        this.noticeMsg = '请在11月18日 14:00前到达赛馆参加彩排'
        return true
      } else {
        return false
      }
    }
    ,
    isReport() {
      if (this.selfUserInfo.chlx == '9') {
        // 随行媒体人员
        return true
      } else {
        return false
      }
    }
    ,
    isPs() {
      //判断是否为评审专家
      if (this.selfUserInfo.chlx == '17') {
        //评审专家
        this.noticeMsg = '请在11月18日 16:00前到达专家会议地点参会'
        return true
      } else {
        return false
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.warpper {
  .basicInfo-box {
    background-color: white;
    padding: 20px 10px 5px;


    .basicInfo {
      font-size: 24px;
      font-weight: bold;
    }

    .lable-item {
      font-size: 14px;
      color: red;
      margin-top: 10px;
      word-break: break-all;
    }

  }

  .down-load {
    display: inline;
    color: red;
    font-weight: bold;
  }

  /deep/ .van-dialog {
    height: 80%;
    display: flex;
    flex-direction: column;

    .van-dialog__content {
      overflow-y: scroll;
      padding: 20px 10px;
      box-sizing: border-box;
      flex: 1;

      h1 {
        text-align: center;
        margin-bottom: 10px;
        line-height: 40px;
      }
    }
  }

  .school-bg {
    background-color: #017bd3;
    padding: 10px 15px;

    .school-field {
      padding-top: 0;
      padding-bottom: 0;
      line-height: 35px;
      height: 35px;
      border-radius: 5px;
    }
  }

  .botton-btn {
    display: flex;
    align-items: center;
    border-top: 1px solid #e8e8e8;
    width: 100%;
    height: 40px;
    line-height: 40px;
    box-sizing: border-box;

    .btn {
      flex: 1;
      text-align: center;
      font-size: 14px;
      color: #017bd3;

      &:first-child {
        border-right: 1px solid #e8e8e8;
        color: red;
      }
    }
  }

  .popup {
    /deep/ .van-picker__toolbar {
      justify-content: normal;
      border-top: 1px solid #e8e8e8;

      button {
        flex: 1;
        text-align: center;
        font-size: 14px;
        color: #017bd3;

        &:first-child {
          border-right: 1px solid #e8e8e8;
          color: red;
        }
      }
    }

    .school-cell {
      height: 300px;
      overflow-y: scroll;
    }
  }


  /deep/ .van-picker-column__wrapper {
    .van-ellipsis {
      white-space: break-spaces;
    }
  }

  .two-btn {
    padding: 0 20px;
  }

  .develop-box {
    padding: 15px 0;
    background-color: white;
    font-size: 14px;

  }

  .ylt-box {
    width: 100%;

    .ylt-item {
      width: 80px;
      height: 80px;
      margin: 0 9px 9px 0;
      border-radius: 5px;
      position: relative;

      &:after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0px;
        right: 0px;
        background: rgba(0, 0, 0, 0.4);
        height: 100%;
        z-index: 0;
        border-radius: 5px;
      }

      .ylt-img {
        border-radius: 5px;
        width: 100%;
        height: 100%;
      }

      .ylt-text {
        color: white;
        font-size: 13px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
      }
    }

  }

}
</style>
